package com.speedricemanager.activity.home.registeframent.mode;

import com.jbm.core.iface.IAcross;
import com.jbm.jsm.iface.TaskMouldRequireEntity;
import com.speedricemanager.activity.home.abstracts.NetModea;
import com.speedricemanager.activity.home.intface.IntegerFaceOr;
import com.speedricemanager.net.AllNet;

import java.util.Date;
import java.util.List;

/**
 * Created by 李征 on 2017/12/17.
 */

public class RegisterauditFramentMode extends NetModea implements RegisterauditFramentMode_Inter{
AllNet allNet;
    IntegerFaceOr s;
    public RegisterauditFramentMode() {
        allNet=new AllNet(this);
    }

    @Override
    public void getModuleList(String keyword, int plat_type, String status, String startdate, String enddate, int start, int pagesize, IntegerFaceOr integerFaceOr) {
        this.s=integerFaceOr;
   allNet.getModuleList( keyword,  plat_type,  status,  startdate,  enddate,  start,  pagesize);
    }

    @Override
    public void AuditTaskMoulds(int tm_id, int status, String reason, String userpay, String requirement, String doFlow, String comment, Date startdate, Date enddate, String rental, String viceAccount, String mainDeposit, String viceDeposit, List<TaskMouldRequireEntity> requireList, IntegerFaceOr integerFaceOr) {
        this.s=integerFaceOr;
        allNet.AuditTaskMoulds(tm_id,status,reason,userpay,requirement,doFlow,comment,startdate,enddate,rental,viceAccount,mainDeposit,viceDeposit,requireList);

    }


    @Override
    protected void onComplete(IAcross iAcross, String methodName) {
        super.onComplete(iAcross, methodName);
        if (methodName.equals("getModuleList")){
            s.getSucces(iAcross);
        }else  if (methodName.equals("AuditTaskMould")){
            s.getSucces(iAcross);
        }
    }

    @Override
    protected void onExe(IAcross iAcross, String methodName) {
        super.onExe(iAcross, methodName);
        if (methodName.equals("getModuleList")){
            s.getError(iAcross);
        }else  if (methodName.equals("AuditTaskMould")){
            s.getError(iAcross);
        }
    }
}
